import request from '@/utils/request'


export function listPage(params) {
    return request({
        url: '/file/listPage',
        method: 'get',
        params
    })
}

export function list(params) {
    return request({
        url: '/file/list',
        method: 'get',
        params
    })
}

export function save(data) {
    return request({
        url: `/file/add`,
        method: 'post',
        data
    })
}

export function update(data) {
    return request({
        url: `/file/update`,
        method: 'post',
        data
    })
}

export function del(id) {
    return request({
        url: `/file/delete`,
        method: 'delete',
        params: { id: id }
    })
}
export function updateStatus(id, status) {
    return request({
        url: `/file/updateStatus/${id}/${status}`,
        method: 'get',
    })
}
